/*
 * Rule.h
 *
 *  Created on: Jun 29, 2012
 *      Author: victor
 */

#ifndef RULE_H_
#define RULE_H_

#include <map>
#include "Command.h"
#include "PipedCommand.h"
#include <cstdlib>
#include <iostream>
#include <string.h>
#include <stdio.h>


using namespace std;

class Rule{

private:
	bool newPipe;
	vector<Command*> * commands;
	PipedCommand * pipedCommand;
	Command * lastCommand;

public:
	Rule();
	void addCommand(Command*);
	void executeCommands();
	void clear();
	Command * getLastCommand();
	void removeLastCommand();
	void addPipe();
};


#endif /* RULE_H_ */
